<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box{
            width:150px;
            height:150px;
            background-color: #ff6700;

            /*2.设置动画*/
            animation-name:move;

            /*动画持续时间*/
            animation-duration:2s;

            /*动画执行结束后保持最后一帧*/
            animation-fill-mode:forwards;

        }
        /*1.定义关键帧动画*/
        @keyframes move{
            /*第一帧*/
            from{
                width:150px;
            }
            /*最后一帧*/
            to{
                width:600px;
            }
        }

    </style>
</head>
<body>
<div class="box"></div>
</body>
</html>